﻿package com.gamemeal.filters {
	import flash.display.BitmapData;
	import flash.geom.Point;
	/**
	 * @author Colin
	 */
	public class CustomFilterThreshold{
		private var origin:Point = new Point(0,0);
		private var maxColor:Number = 0xFF808080;
		
		public function CustomFilterThreshold(maxColor:Number=0xFF808080){
			this.maxColor = maxColor;
		}

		public function apply(bmp:BitmapData):void{
			bmp.threshold(bmp, bmp.rect,origin,">=", maxColor, 0xFFFFFFFF);
		}
	}
}
